//第四题
import java.util.Scanner;
public class M80504 {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        System.out.println("请输入一个五位数：");
        int num=in.nextInt();
        int ww=num/10000;
        int qw=num/1000%10;
        int bw=num/100%10;
        int sw=num/10%10;
        int gw=num%10;
        int he=ww+qw+bw+sw+gw;
        System.out.println("和为"+he);
    }
}
